home *** CD-ROM | disk | FTP | other *** search
/ Champak 52 / Volume 52 - JOGO DISK .iso / Games / decorating_phebes_room.swf / scripts / frame_6 / DoAction.as
Text File  |  2007-09-26  |  2KB  |  82 lines

  1. function setSelected(clip, frame)
  2. {
  3.    var _loc1_ = frame;
  4.    var _loc2_ = _root;
  5.    _loc2_[clip].gotoAndStop(_loc1_);
  6.    switch(clip)
  7.    {
  8.       case "bed":
  9.          _loc2_.data[0] = _loc1_;
  10.          break;
  11.       case "wall":
  12.          _loc2_.data[1] = _loc1_;
  13.          break;
  14.       case "floor":
  15.          _loc2_.data[2] = _loc1_;
  16.          break;
  17.       case "window":
  18.          _loc2_.data[3] = _loc1_;
  19.          break;
  20.       case "mat":
  21.          _loc2_.data[4] = _loc1_;
  22.          break;
  23.       case "cartoon":
  24.          _loc2_.data[5] = _loc1_;
  25.          break;
  26.       case "light":
  27.          _loc2_.data[6] = _loc1_;
  28.          break;
  29.       case "light0":
  30.          _loc2_.data[7] = _loc1_;
  31.          break;
  32.       case "desk":
  33.          _loc2_.data[8] = _loc1_;
  34.          break;
  35.       case "art":
  36.          _loc2_.data[9] = _loc1_;
  37.    }
  38. }
  39. stop();
  40. this.data = new Array();
  41. data1 = ["bed","wall","floor","window","mat","cartoon","light","light0","desk","art"];
  42. btn_bed.onPress = function()
  43. {
  44.    _root.setSelected("bed",this._currentframe + 1);
  45. };
  46. btn_wall.onPress = function()
  47. {
  48.    _root.setSelected("wall",this._currentframe + 1);
  49. };
  50. btn_floor.onPress = function()
  51. {
  52.    _root.setSelected("floor",this._currentframe + 1);
  53. };
  54. btn_window.onPress = function()
  55. {
  56.    _root.setSelected("window",this._currentframe + 1);
  57. };
  58. btn_mat.onPress = function()
  59. {
  60.    _root.setSelected("mat",this._currentframe + 1);
  61. };
  62. btn_cartoon.onPress = function()
  63. {
  64.    _root.setSelected("cartoon",this._currentframe + 1);
  65. };
  66. btn_light.onPress = function()
  67. {
  68.    _root.setSelected("light",this._currentframe + 1);
  69. };
  70. btn_light0.onPress = function()
  71. {
  72.    _root.setSelected("light0",this._currentframe + 1);
  73. };
  74. btn_desk.onPress = function()
  75. {
  76.    _root.setSelected("desk",this._currentframe + 1);
  77. };
  78. btn_art.onPress = function()
  79. {
  80.    _root.setSelected("art",this._currentframe + 1);
  81. };
  82.